function Logger(target:object,propertyKey:string,descriptor:PropertyDescriptor){
  const originnal = descriptor.value
  descriptor.value = function(){
    console.log(propertyKey+'开始了')
    originnal.call()
    console.log(propertyKey+'结束了')
  }
}

class Person{
  constructor(
    public name:string,
    public age:number
  ){}
  @Logger speak(){
    console.log('你好')
  }static isAdult(age:number){
    return age>= 18
  }
}

const p1 = new Person('张三',18)
p1.speak()